﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace Scan.Model
{
    public class ErrorMessage
    {
        private int _errorcode = 0;
        /// <summary>
        /// 错误编号
        /// </summary>
        public int ErrorCode
        {
            get { return _errorcode; }
            set { _errorcode = value; }
        }

        private String _errorInfo = "";
        /// <summary>
        /// 错误信息
        /// </summary>
        public String ErrorInfo
        {
            get { return _errorInfo; }
            set { _errorInfo = value; }
        }

        private string _stackTrace = "";
        /// <summary>
        /// 跟踪信息
        /// </summary>
        public string StackTrace
        {
            get { return _stackTrace; }
            set { _stackTrace = value; }
        }

        private string _source = "";
        /// <summary>
        /// 错误来源
        /// </summary>
        public string Source
        {
            get { return _source; }
            set { _source = value; }
        }

        public ErrorMessage(int errcode, string errinfo, string stacktrace, string source)
        {
            this.ErrorCode = errcode;
            this.ErrorInfo = errinfo;
            this.StackTrace = stacktrace;
            this.Source = source;
        }

        public ErrorMessage(int errcode, string errinfo, string source)
        {
            this.ErrorCode = errcode;
            this.ErrorInfo = errinfo;
            this.Source = source;
        }

        public ErrorMessage(int errcode, string errinfo)
        {
            this.ErrorCode = errcode;
            this.ErrorInfo = errinfo;
        }

        public ErrorMessage()
        {
 
        }
    }
}
